﻿<UserControl x:Class="FXSStation.Modules.ChartModule.Tester"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:igCA="http://infragistics.com/Chart">
    <DockPanel x:Name="LayoutRoot" LastChildFill="True">
        <DockPanel.Resources>
            <ContextMenu x:Key="chartContextMenu">
                <MenuItem Header="Buy Order" x:Name="buyOrder" Click="buyOrder_Click"/>
                <MenuItem Header="Sell Order" x:Name="sellOrder" Click="sellOrder_Click"/>
                <MenuItem Header="Chart Indicators">
                    <MenuItem Header="Simple Moving Average" x:Name="AddSMA" Click="AddSMA_Click"/>
                    <MenuItem Header="Weighted Moving Average" x:Name="AddWMA" Click="AddWMA_Click"/>
                    <MenuItem Header="Exponential Moving Average" x:Name="AddEMA" Click="AddEMA_Click"/>
                </MenuItem>
            </ContextMenu>
        </DockPanel.Resources>
        <!--<chart:CandleChart x:Name="chart" Height="500" Width="700"/>-->
        <Grid DockPanel.Dock="Right" Width="150" VerticalAlignment="Stretch">
            <Grid.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="FontSize" Value="22"/>
                </Style>
            </Grid.Resources>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TextBlock x:Name="tbResult" Grid.Row="0"/>
            <DockPanel Grid.Row="2">
                <Slider x:Name="speedSlider" DockPanel.Dock="Left" Orientation="Vertical"/>
                <TextBlock DockPanel.Dock="Top" Width="Auto" Height="Auto" VerticalAlignment="Top" >-</TextBlock>
                <TextBlock DockPanel.Dock="Bottom" Width="Auto" Height="Auto" VerticalAlignment="Bottom" >+</TextBlock>

            </DockPanel>
            <DockPanel Grid.Row="1">
                <TextBlock DockPanel.Dock="Top">Current Price</TextBlock>
                <TextBlock Name="textBlock1" DockPanel.Dock="Top"/>
            </DockPanel>
        </Grid>
        <igCA:XamChart Name="xamChart1" RenderTransformOrigin="0.5,0.5" ContextMenu="{StaticResource chartContextMenu}"
                       VerticalAlignment="Stretch" HorizontalAlignment="Stretch" DockPanel.Dock="Left"
                       MouseMove="xamChart1_MouseMove">
            <igCA:XamChart.Resources>
                
            </igCA:XamChart.Resources>
            <igCA:XamChart.Caption>
                <igCA:Caption FontSize="16" FontWeight="Bold"/>
            </igCA:XamChart.Caption>
            <igCA:XamChart.Axes>
                <igCA:Axis AxisType="PrimaryX" Visible="False"/>
                <igCA:Axis AxisType="PrimaryY" RangeFromZero="False" AutoRange="True">
                    <igCA:Axis.MajorTickMark>
                        <igCA:Mark StrokeThickness="5" />
                    </igCA:Axis.MajorTickMark>

                    <igCA:Axis.MinorTickMark>
                        <igCA:Mark Stroke="Red" Unit="3" />
                    </igCA:Axis.MinorTickMark>

                </igCA:Axis>
            </igCA:XamChart.Axes>
            <igCA:XamChart.Series>
            </igCA:XamChart.Series>
            <igCA:XamChart.Legend>
                <igCA:Legend Visible="False"/>
            </igCA:XamChart.Legend>
            <igCA:XamChart.Scene>
                <igCA:Scene >
                    <igCA:Scene.GridArea>
                        <igCA:GridArea Margin="0,0,0,0" MarginType="Percent"/>

                    </igCA:Scene.GridArea>
                </igCA:Scene>
            </igCA:XamChart.Scene>
        </igCA:XamChart>
        
        
    </DockPanel>
</UserControl>
